package com.yoo.ons.dialog.viewmodel

import androidx.lifecycle.MutableLiveData
import com.yoo.ons.base.BaseVMViewModel

/**
 * 专门处理信息弹窗相关逻辑
 */
class ProInfoDialogViewModel : BaseVMViewModel() {

    val clickTopMiniLiveData = MutableLiveData<Boolean>()
    val slideShowTopViewLiveData = MutableLiveData<Boolean>()
    val slideUpLiveData = MutableLiveData<Int>()

    //当点击ProInfoTopDialogFragment的最顶部需要去让信息弹窗显示五分之一高度
    fun showProfileInfoMinHeight(isClick: Boolean) {
        clickTopMiniLiveData.value = isClick
    }

    //如果折叠五分之一以后，再次滑动的时候，展开=隐藏view，折叠显示view
    fun showProfileInfoTopView(isShow: Boolean) {
        slideShowTopViewLiveData.value = isShow
    }

    //当滑动top弹窗的View的时候通知切换banner图片 0上滑 1下滑
    fun switchBanner(isUp: Int) {
        slideUpLiveData.value = isUp
    }
}